package com.fxf.srb.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description TODO
 * @Author fxf
 * @Date 2021/6/1 9:44
 * @Version 1.0
 */
@AllArgsConstructor
@Getter
public enum BorrowerStatusEnum {

    NO_BRROWER(0, "未认证"),
    BRROWER_ING(1, "认证中"),
    BRROWER_OK(2, "认证通过"),
    BRROWER_FAIL(-2, "认证失败"),
    ;

    private Integer status;
    private String msg;

    //根据状态码获取value提示信息
    public static String getMsgByStatus(int status) {
        BorrowerStatusEnum arrObj[] = BorrowerStatusEnum.values();
        for (BorrowerStatusEnum obj : arrObj) {
            if (status == obj.getStatus().intValue()) {
                return obj.getMsg();
            }
        }
        return "";
    }
}
